<template>
  <div>About</div>
  <span>opations的计算属性TotalPrice : {{ TotalPrice }}</span>
  <br />
</template>

<script>
export default {
  computed: {
    TotalPrice() {
      return this.$store.state.books.reduce((pre, { price, count }) => pre + price * count, 0)
    },
  },
}
</script>

<style lang="scss" scoped></style>
